﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using DAO;
using System.ComponentModel;

namespace BUS
{
    public class UsersGroupBUS
    {
        UsersGroupDAO userGrDAO = new UsersGroupDAO();

        public int InsertUsersGroup(UsersGroupDTO userGroup)
        {
            return userGrDAO.InsertUsersGroup(userGroup);
        }

        public List<UsersGroupDTO> GetUsersGroupList()
        {
            return userGrDAO.GetUsersGroupList();
        }

        public bool CheckExistsCode(string code)
        {
            return userGrDAO.CheckExistsCode(code);
        }

        public bool UpdateUsersGroup(UsersGroupDTO userDTO)
        {
            return userGrDAO.UpdateUsersGroup(userDTO);
        }

        public UsersGroupDTO GetUsersGroupByID(int userID)
        {
            return userGrDAO.GetUsersGroupByID(userID);
        }

        public BindingList<UsersGroupDTO> GetNewBindingListUsersGroup()
        {
            return userGrDAO.GetNewBindingListUsersGroup();
        }

        public bool DeleteUsersGroup(int userID)
        {
            return userGrDAO.DeleteUsersGroup(userID);
        }
    }
}
